package com.aeye.mbr.sms;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;

public class SmsContext implements Serializable {

    /**
     * 短信平台AppId或者用户名
     */
    private String appId;

    /**
     * 短信平台AppSecret或者密码
     */
    private String appSecret;


    private Long smsConfigId;


    /**
     * 短信签名
     */
    private String signName;


    private String platform;


    private Integer topOrgId;


    private String templateType;


    private String templateId;


    /**
     * 过期时间
     */
    private Integer expireTime = 0;


    /**
     * 模板内容
     */
    private String content;



    private Integer maxTotalCount = 0;

    private Integer maxTemplateCount = 0;


    private String ip;



    private Map<String, Object> attribute = new LinkedHashMap<>();


    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getSignName() {
        return signName;
    }

    public void setSignName(String signName) {
        this.signName = signName;
    }


    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }


    public Integer getTopOrgId() {
        return topOrgId;
    }

    public void setTopOrgId(Integer topOrgId) {
        this.topOrgId = topOrgId;
    }

    public void addAttribute(String key, Object value) {
        attribute.put(key, value);
    }


    public <T extends Object> T getAttribute(String key) {
        return (T) attribute.get(key);
    }


    public String getTemplateType() {
        return templateType;
    }

    public void setTemplateType(String templateType) {
        this.templateType = templateType;
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public Integer getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Integer expireTime) {
        this.expireTime = expireTime;
    }


    public boolean containsKey(String key){
        return attribute.containsKey(key);
    }


    public Long getSmsConfigId() {
        return smsConfigId;
    }

    public void setSmsConfigId(Long smsConfigId) {
        this.smsConfigId = smsConfigId;
    }


    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


    public Integer getMaxTotalCount() {
        return maxTotalCount;
    }

    public void setMaxTotalCount(Integer maxTotalCount) {
        this.maxTotalCount = maxTotalCount;
    }

    public Integer getMaxTemplateCount() {
        return maxTemplateCount;
    }

    public void setMaxTemplateCount(Integer maxTemplateCount) {
        this.maxTemplateCount = maxTemplateCount;
    }


    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
